import fetch from 'common/src/utils/fetch'
const api_name = 'api/textbookservice'
const group_name = 'textbookType'

export default{
  'pageUrl': `${api_name}/${group_name}/list`,
  save(data){
    return fetch({
      url:`${api_name}/${group_name}`,
      method:'post',
      data:data
    })
  },

  findById(id){
    return fetch({
      url:`${api_name}/${group_name}/${id}`,
      method:'get'
    })
  },

  updateById(data){
    return fetch({
      url:`${api_name}/${group_name}`,
      method:'put',
      data:data
    })
  },
  deleteById(id){
    var data = {ids : id}
    return fetch({
      url:`${api_name}/${group_name}`,
      method:'delete',
      data:data
    })
  }
}

